/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package engine165.renderSystem.interfaces;

import engine165.renderSystem.CameraScript;
import graphicslib3D.*;
import helperClasses.Quaternion;

/**
 * Interface for the game camera
 * @author Matthew
 */
public interface ICamera 
{
    /**
     * gets the right axis of the camera.
     * @return
     */
    public Vector3D getRightAxis();
    
    /**
     * gets the up axis of the camera.
     * @return
     */
    public Vector3D getUpAxis();
    
    /**
     * gets the forward axis of the camera.
     * @return
     */
    public Vector3D getViewDirection();
    
    /**
     * sets the right axis of the camera
     * @param right
     */
    public void setRightAxis(Vector3D right);
    
    /**
     * sets the up axis of the camera
     * @param up
     */
    public void setUpAxis(Vector3D up);
    
    /**
     * sets the forward axis of the camera
     * @param dir
     */
    public void setViewDirection(Vector3D dir);
    
    /**
     * gets the current location of the camera
     * @return
     */
    public Point3D getLocation();
    
    /**
     * sets the location of the camera
     * @param loc
     */
    public void setLocation(Point3D loc);
    
    /**
     * sets all three axes at once for the camera
     * @param right
     * @param up
     * @param viewDir
     */
    public void setAxes(Vector3D right, Vector3D up, Vector3D viewDir);
    
    /**
     * Rotates the camera according to a look at value
     * @param pos
     * @param upDir
     */
    public void lookAt(Point3D pos, Vector3D upDir);
    
    /**
     * sets the perspective view of the camera.
     * @param fovY field of view (typically 30 degrees)
     * @param aspect aspect ratio
     * @param near near clipping plane
     * @param far far clipping plane
     */
    public void setPerspectiveFrustum(double fovY, double aspect, double near, double far);
    
    /**
     * Applys all settings to the Render System
     */
    public void applySettings();
    
    /**
     * gets the current rotation of the camera using a Quaternion
     * @return
     */
    public Quaternion getRotation();
    
    /**
     * sets the rotation of the camera using a Quaternion
     * @param rot
     */
    public void setRotation(Quaternion rot);
    
    /**
     * updates the rotation of the camera using a quaternion
     * @param rot
     */
    public void updateRotation(Quaternion rot);
    
    /**
     * returns true if cinematic mode is enabled
     * @return
     */
    public boolean isCinematicMode();
    
    /**
     * toggles cinematic mode
     * @param enable
     */
    public void toggleCinematicMode(boolean enable);
    
    /**
     * starts automatic camera movement according to the currently loaded camera script.
     */
    public void startCinematic();
    
    /**
     * pauses the current cinematic
     */
    public void pauseCinematic();
    
    /**
     * stops the current cinematic and returns to the starting position
     */
    public void stopCinematic();
    
    /**
     * loads a new cinematic
     * @param cinematic
     */
    public void loadCinematic(CameraScript cinematic);
}
